package com.qf.kady.ssm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: kady
 * \* Date: 2021/4/21
 * \* Time: 11:50
 * \* 千峰JAVA2101班
 * \* Description: 结果实体
 * \
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVO<T> {
    private boolean success;
    private String message;
    private T data;

    public static <T> ResultVO ok(String message,T data){
        return new ResultVO(true,message,data);
    }

    public static <T> ResultVO error(String message,T data){
        return new ResultVO(false,message,data);
    }

}
